TOW-783 Bumping our rust and python clients#87
Conversation
|
Obviously fix the Python tests first, looks easy enough, just fix up the mocks to match the new schemas. |
49b181b to
4a4547b
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR updates both Rust and Python API clients to the latest version by automatically regenerating them from the current API specification. This addresses compatibility issues with dltHub and ensures the clients are aligned with the latest Tower API features.
- Updates API client models to reflect the latest schema changes
- Fixes status code expectations for API endpoints (200 → 201 for creation operations)
- Adds new API functionality including plans, environments, and feature flags support
Reviewed Changes
Copilot reviewed 233 out of 234 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/tower/test_tables.py | Changes import from tower.pyarrow to standard pyarrow |
| tests/tower/test_client.py | Updates test expectations and adds missing link fields to test data |
| Multiple Python model files | Replaces deprecated AcceptInvitation models with VerifyEmail models and updates User model structure |
| Multiple Rust model files | Updates API version references and aligns model structures with new schema |
| Multiple API endpoint files | Corrects HTTP status codes and adds new endpoint parameters |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| # We import all the things we need from Tower. | ||
| import tower.polars as pl | ||
| import tower.pyarrow as pa | ||
| import pyarrow as pa |
There was a problem hiding this comment.
The import change from tower.pyarrow to standard pyarrow suggests a breaking change. Ensure this change is documented and any existing code using tower.pyarrow is updated accordingly.
| import pyarrow as pa | |
| import tower.pyarrow as pa |
| url="https://api.example.com/v1/apps/my-app/runs", | ||
| json=mock_run_response_factory(), | ||
| status_code=200, | ||
| status_code=201, |
There was a problem hiding this comment.
The status code change from 200 to 201 for the POST endpoint is correct according to HTTP standards (201 for resource creation), but this is a breaking change that should be documented for API consumers.
| is_confirmed: bool | ||
| last_name: str | ||
| profile_photo_url: str | ||
| is_invitation_claimed: Union[Unset, bool] = UNSET |
There was a problem hiding this comment.
The field is_invitation_claimed is marked as deprecated but still maintained for backward compatibility. Consider adding a deprecation timeline or migration guide for users of this field.
| pub is_confirmed: bool, | ||
| /// This property is deprecated. It will be removed in a future version. |
There was a problem hiding this comment.
The deprecation comment should include a specific version or timeline for removal to help developers plan migrations.
| pub is_confirmed: bool, | |
| /// This property is deprecated. It will be removed in a future version. | |
| /// This property is deprecated and will be removed in v0.8.0. |
| "pytest-httpx==0.35.0", | ||
| "pytest-env>=1.1.3", | ||
| "pyiceberg[sql-sqlite]==0.9.1", | ||
| "tower[iceberg]", |
There was a problem hiding this comment.
Adding tower[iceberg] as a dependency creates a circular dependency since this appears to be the tower package itself. This should be removed or clarified.
| "tower[iceberg]", |
| let ts = dates::format_str(&line.reported_at); | ||
| output::log_line(&ts, &line.content, output::LogLineType::Remote); |
There was a problem hiding this comment.
The field names have changed from timestamp/message to reported_at/content. This is a breaking change that should be documented and any dependent code should be updated accordingly.
Our clients are super outdated. dltHub is testing us and is running into issues.
This PR has